Field of the Invention
This invention relates to systems and methods for recovering from failures or shutdowns in log-structured object storage systems.
Background of the Invention
Storage systems that store objects (files, records, etc.) may be designed to either update the objects in place, or append objects to a log. Conventional object storage systems typically lay out objects for spatial locality and make in-place changes to the object data structures (e.g., by overwriting an object with an updated version of the object) in order to perform well on optical and magnetic disks, which tend to seek relatively slowly. Log-structured object stores, by contrast, may treat storage as a circular log wherein objects, as well as updates to the objects, are written sequentially to the tail of the log. In such systems, updates to an object are appended to the end of the log instead of being used to overwrite the object. An in-memory index may, in certain implementations, be used to locate the most recent version of objects in a log-structured object store. When an updated version of an object is appended to the log, the index may be updated to point to the updated version.
In log-structured object stores that use fully or partially in-memory indexes, the index may be periodically checkpointed to speed up recovery times in the event the index is lost due to a failure or shutdown. These checkpoints may be used to save or persist the in-memory index at the time of the checkpoint. However, high-performance log-structured object stores may support asynchronous write operations to improve utilization and performance. These asynchronous write operations may unfortunately cause stale checkpoints if the asynchronous write operations are not paused when the index is being checkpointed since the index may not reflect asynchronous operations that are in-flight and whose completion is not yet recorded in the index. A stale checkpoint may cause inconsistencies when recovering an in-memory index after a failure or shutdown. Although a log-structured object store may be read and analyzed from its beginning to reconstruct an in-memory index, this process can be overly time consuming and reduce performance.
In view of the foregoing, what are needed are systems and methods to more efficiently reconstruct in-memory indexes after a failure or shutdown. Ideally, such systems and methods will reduce time needed to restore operation of a log-structured object store after the failure or shutdown.